3.1321 \(\int \frac{(c (d \tan (e+f x))^p)^n}{a+i a \tan (e+f x)} \, dx\)

Optimal. Leaf size=134 \[ \frac{\tan (e+f x) \, _2F_1\left (2,\frac{1}{2} (n p+1);\frac{1}{2} (n p+3);-\tan ^2(e+f x)\right ) \left (c (d \tan (e+f x))^p\right )^n}{a f (n p+1)}-\frac{i \tan ^2(e+f x) \, _2F_1\left (2,\frac{1}{2} (n p+2);\frac{1}{2} (n p+4);-\tan ^2(e+f x)\right ) \left (c (d \tan (e+f x))^p\right )^n}{a f (n p+2)} \]

[Out]

(Hypergeometric2F1[2, (1 + n*p)/2, (3 + n*p)/2, -Tan[e + f*x]^2]*Tan[e + f*x]*(c*(d*Tan[e + f*x])^p)^n)/(a*f*(
1 + n*p)) - (I*Hypergeometric2F1[2, (2 + n*p)/2, (4 + n*p)/2, -Tan[e + f*x]^2]*Tan[e + f*x]^2*(c*(d*Tan[e + f*
x])^p)^n)/(a*f*(2 + n*p))

________________________________________________________________________________________

Rubi [A]  time = 0.276277, antiderivative size = 134, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 5, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {6677, 848, 82, 73, 364} \[ \frac{\tan (e+f x) \, _2F_1\left (2,\frac{1}{2} (n p+1);\frac{1}{2} (n p+3);-\tan ^2(e+f x)\right ) \left (c (d \tan (e+f x))^p\right )^n}{a f (n p+1)}-\frac{i \tan ^2(e+f x) \, _2F_1\left (2,\frac{1}{2} (n p+2);\frac{1}{2} (n p+4);-\tan ^2(e+f x)\right ) \left (c (d \tan (e+f x))^p\right )^n}{a f (n p+2)} \]

Antiderivative was successfully verified.

[In]

Int[(c*(d*Tan[e + f*x])^p)^n/(a + I*a*Tan[e + f*x]),x]

[Out]

(Hypergeometric2F1[2, (1 + n*p)/2, (3 + n*p)/2, -Tan[e + f*x]^2]*Tan[e + f*x]*(c*(d*Tan[e + f*x])^p)^n)/(a*f*(
1 + n*p)) - (I*Hypergeometric2F1[2, (2 + n*p)/2, (4 + n*p)/2, -Tan[e + f*x]^2]*Tan[e + f*x]^2*(c*(d*Tan[e + f*
x])^p)^n)/(a*f*(2 + n*p))

Rule 6677

Int[(u_)*((c_.)*((a_.) + (b_.)*(x_))^(n_))^(p_), x_Symbol] :> Dist[(c^IntPart[p]*(c*(a + b*x)^n)^FracPart[p])/
(a + b*x)^(n*FracPart[p]), Int[u*(a + b*x)^(n*p), x], x] /; FreeQ[{a, b, c, n, p}, x] &&  !IntegerQ[p] &&  !Ma
tchQ[u, x^(n1_.)*(v_.) /; EqQ[n, n1 + 1]]

Rule 848

Int[((d_) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[(d + e*x)
^(m + p)*(f + g*x)^n*(a/d + (c*x)/e)^p, x] /; FreeQ[{a, c, d, e, f, g, m, n}, x] && NeQ[e*f - d*g, 0] && EqQ[c
*d^2 + a*e^2, 0] && (IntegerQ[p] || (GtQ[a, 0] && GtQ[d, 0] && EqQ[m + p, 0]))

Rule 82

Int[((f_.)*(x_))^(p_.)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Dist[a, Int[(a + b*
x)^n*(c + d*x)^n*(f*x)^p, x], x] + Dist[b/f, Int[(a + b*x)^n*(c + d*x)^n*(f*x)^(p + 1), x], x] /; FreeQ[{a, b,
 c, d, f, m, n, p}, x] && EqQ[b*c + a*d, 0] && EqQ[m - n - 1, 0] &&  !RationalQ[p] &&  !IGtQ[m, 0] && NeQ[m +
n + p + 2, 0]

Rule 73

Int[((a_) + (b_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[(a*c + b*
d*x^2)^m*(e + f*x)^p, x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && EqQ[b*c + a*d, 0] && EqQ[n, m] && Integer
Q[m]

Rule 364

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a^p*(c*x)^(m + 1)*Hypergeometric2F1[-
p, (m + 1)/n, (m + 1)/n + 1, -((b*x^n)/a)])/(c*(m + 1)), x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[p, 0] &&
 (ILtQ[p, 0] || GtQ[a, 0])

Rubi steps

\begin{align*} \int \frac{\left (c (d \tan (e+f x))^p\right )^n}{a+i a \tan (e+f x)} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (c (d x)^p\right )^n}{(a+i a x) \left (1+x^2\right )} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\left ((d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \operatorname{Subst}\left (\int \frac{(d x)^{n p}}{(a+i a x) \left (1+x^2\right )} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\left ((d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \operatorname{Subst}\left (\int \frac{(d x)^{n p}}{\left (\frac{1}{a}-\frac{i x}{a}\right ) (a+i a x)^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\left ((d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \operatorname{Subst}\left (\int \frac{(d x)^{n p}}{\left (\frac{1}{a}-\frac{i x}{a}\right )^2 (a+i a x)^2} \, dx,x,\tan (e+f x)\right )}{a f}-\frac{\left (i (d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \operatorname{Subst}\left (\int \frac{(d x)^{1+n p}}{\left (\frac{1}{a}-\frac{i x}{a}\right )^2 (a+i a x)^2} \, dx,x,\tan (e+f x)\right )}{a d f}\\ &=\frac{\left ((d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \operatorname{Subst}\left (\int \frac{(d x)^{n p}}{\left (1+x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{a f}-\frac{\left (i (d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \operatorname{Subst}\left (\int \frac{(d x)^{1+n p}}{\left (1+x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{a d f}\\ &=\frac{\, _2F_1\left (2,\frac{1}{2} (1+n p);\frac{1}{2} (3+n p);-\tan ^2(e+f x)\right ) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{a f (1+n p)}-\frac{i \, _2F_1\left (2,\frac{1}{2} (2+n p);\frac{1}{2} (4+n p);-\tan ^2(e+f x)\right ) \tan ^2(e+f x) \left (c (d \tan (e+f x))^p\right )^n}{a f (2+n p)}\\ \end{align*}

Mathematica [F]  time = 19.8215, size = 0, normalized size = 0. \[ \int \frac{\left (c (d \tan (e+f x))^p\right )^n}{a+i a \tan (e+f x)} \, dx \]

Verification is Not applicable to the result.

[In]

Integrate[(c*(d*Tan[e + f*x])^p)^n/(a + I*a*Tan[e + f*x]),x]

[Out]

Integrate[(c*(d*Tan[e + f*x])^p)^n/(a + I*a*Tan[e + f*x]), x]

________________________________________________________________________________________

Maple [F]  time = 8.728, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( c \left ( d\tan \left ( fx+e \right ) \right ) ^{p} \right ) ^{n}}{a+ia\tan \left ( fx+e \right ) }}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*(d*tan(f*x+e))^p)^n/(a+I*a*tan(f*x+e)),x)

[Out]

int((c*(d*tan(f*x+e))^p)^n/(a+I*a*tan(f*x+e)),x)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*tan(f*x+e))^p)^n/(a+I*a*tan(f*x+e)),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{\left (c \left (\frac{-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}\right )^{p}\right )^{n}{\left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{2 \, a}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*tan(f*x+e))^p)^n/(a+I*a*tan(f*x+e)),x, algorithm="fricas")

[Out]

integral(1/2*(c*((-I*d*e^(2*I*f*x + 2*I*e) + I*d)/(e^(2*I*f*x + 2*I*e) + 1))^p)^n*(e^(2*I*f*x + 2*I*e) + 1)*e^
(-2*I*f*x - 2*I*e)/a, x)

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*tan(f*x+e))**p)**n/(a+I*a*tan(f*x+e)),x)

[Out]

Exception raised: AttributeError

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (\left (d \tan \left (f x + e\right )\right )^{p} c\right )^{n}}{i \, a \tan \left (f x + e\right ) + a}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*tan(f*x+e))^p)^n/(a+I*a*tan(f*x+e)),x, algorithm="giac")

[Out]

integrate(((d*tan(f*x + e))^p*c)^n/(I*a*tan(f*x + e) + a), x)